package com.manager.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class EnterConsole {
	
	/**
	 * 从控制对接收一行字符串，然后输出到控制台
	 * @throws IOException
	 */
	public static String printConsoleLine(String msg) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = null;
		System.out.println(msg);
		try {
			str = br.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return str;
	}

	public static void main(String[] args) throws IOException {
		String rs = EnterConsole.printConsoleLine("please enter name, age");
		System.out.println(rs);
	}
}
